Xbasic

PDF_FromBitmap Function

Syntax

Result as P = PDF_FromBitmap(P p )

Arguments

Result

Contains an error flag.

p

Properties that control the conversion process.

Description

The PDF_FromBitmap() function converts a bitmap file into a PDF file. Typically this function is used to create a PDF file that will be used as a Watermark for another PDF file. Returns the name of the PDF file.

Example

dim ptr as P

ptr.bitmapFile = "c:\a5v51\splash.bmp" 
ptr.pageHeight = 11 
ptr.pageWidth = 8.5 
ptr.centerBitmap = .f. 
ptr.top = 0 
ptr.left = 0 
ptr.grayscale = .t. 
ptr.grayscaleLevel = 80 '100 means very light - 0 means no tint 
ptr.outputFilename = "c:\wm1.pdf" 
ptr.PrinterName = "Alpha Anywhere Printer" 
ptr.imageHeight = 4 
ptr.imageWidth = 5 
ptr.ImageStyle = "bestfit" ' "tile" '"Stretch" '"BestFit"
result = PDF_FromBitmap(ptr) 
if result.error = .f. then 
sys_open(ptr.outputfilename) 
end if

See Also